import 'dart:io';

void main(List<String> args) {
  print('11111');
  sleepp();
  print('2222');
}

sleepp() {
  // Future.delayed(Duration(seconds: 2), () {
  //   print('延迟2秒执行');
  // });
  // print('开始执行');
  sleep(Duration(seconds: 3));
}
//promise三个状态：pending、fulfilled、rejected
//fulfilled：成功
//rejected：失败
//pending：进行中
//then：成功回调
//catch：失败回调
//finally：无论成功还是失败都会执行


